<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <p>常规</p> 
      <p>{{firstName + '.'+LastName}}</p>
      <p>函数</p>
      <p>{{getFullName()}}</p>
      <p>计算属性</p>
      <p>{{fullName}}</p>

    </div>

    <script src="../js/vue.js"></script>

    <script>
      const app = Vue.createApp({
        data() {
          return {
            firstName:'test',
            LastName:"w"
          }
        },
        computed:{
          fullName(){
            return this.firstName + "." +this.LastName;
          }
        },
        methods: {
          getFullName(){
            return `${this.firstName}.${this.LastName}`;
          }
        },
      }).mount("#app");
    </script>
  </body>
</html>